/*
 * 文 件    名:  OrderServiceProvider.java
 * 创建日期:  2012-9-29上午10:07:36
 * 版          权:  Epro Technologies Co., Ltd. Copyright 2011-2012,  All rights reserved
 * 作          者:  hjd008
 */
package com.weipu.common.facade;

import java.util.ArrayList;

import com.weipu.common.facade.exception.DxException;
import com.weipu.common.facade.model.CreateOrderStatus;
import com.weipu.common.facade.model.Operator;
import com.weipu.common.facade.model.OrderItemModel;
import com.weipu.common.facade.model.OrderModel;
import com.weipu.common.facade.model.OrderPayModel;
import com.weipu.common.facade.model.OrderPaypalModel;
import com.weipu.common.facade.model.OrderQueryTranscationsModel;
import com.weipu.common.facade.model.OrderStatusModel;
import com.weipu.common.facade.model.OrderhistoryModel;
import com.weipu.common.facade.model.Package;

/** 
 * @Description 订单服务提供者
 * @version [版本号, 2012-9-29]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 * 
 * @author hjd008
 */
public interface OrderServiceProvider
{
    /**
     * 
      *  调用此接口获得paypal页面，完成支付功能
      * @return  [参数说明]
      * @return String [返回类型说明]
      * @exception throws [违例类型] [违例说明]
      * @see [类、类#方法、类#成员]
     */
    String setMobileCheckOut(OrderPaypalModel orderPayPalModel)
        throws DxException;
    
    /**
      *  获取所有订单列表
      * @param customerId
      * @param orderdatefrom
      * @param pageIndex
      * @param pageSize
      * @return  [参数说明]
      * @return String [返回类型说明]
      * @exception throws [违例类型] [违例说明]
      * @see [类、类#方法、类#成员]
      */
    ArrayList<OrderItemModel> findOrder(String customerId,String orderDisplayType, String orderdatefrom, int pageIndex, int pageSize,String token)
        throws DxException;
    
    /**
      *  根据订单号获取某一订单详情
      * @param orderNumber
      * @return  [参数说明]
      * @return String [返回类型说明]
      * @exception throws [违例类型] [违例说明]
      * @see [类、类#方法、类#成员]
      */
    OrderModel getOrder(String orderNumber,String token,long customerID)
        throws DxException;
    
    /**
      *  取消订单
      * @param OrderNumber
      * @param AutoEndEditOrder
      * @param OrderMemoAudienceType
      * @param Notes
      * @param Reason
      * @return  [参数说明]
      * @return String [返回类型说明]
      * @exception throws [违例类型] [违例说明]
      * @see [类、类#方法、类#成员]
      */
    boolean cancelOrder(String OrderNumber, boolean IsRefund, String otherReason, String RefundMethod, String Reason,
        String RequestUserName,String token,long customerID)
        throws DxException;
    
    /**
      *  为EditionOrder加锁
      * @param orderNumber M
      * @param Notes O
      * @param RquestUserName O
      * @return  [参数说明]
      * @return String [返回类型说明]
      * @exception throws [违例类型] [违例说明]
      * @see [类、类#方法、类#成员]
      */
    String beginEditOrder(String orderNumber, String Notes, String RquestUserName,String token,long customerID)
        throws DxException;
    
    /**
      *  为EditionOrder解锁
      * @param orderNumber
      * @param Notes
      * @param RquestUserName
      * @return  [参数说明]
      * @return String [返回类型说明]
      * @exception throws [违例类型] [违例说明]
      * @see [类、类#方法、类#成员]
      */
    String EditionOrder(String orderNumber, String Notes, String RquestUserName)
        throws DxException;
    
    /**
      *  修改收获地址
      * @param CustomerIP
      * @param OrderNumber
      * @param shippingAddress
      * @param ShippingMethod
      * @return  [参数说明]
      * @return String [返回类型说明]
      * @exception throws [违例类型] [违例说明]
      * @see [类、类#方法、类#成员]
      */
    String ChangeShippingOptions(String CustomerIP, String OrderNumber, OrderModel.ShipAddress shippingAddress,
        String ShippingMethod)
        throws DxException;
    
    /**
      * 获取订单历史状态
      * @param OrderNumber
      * @return
      * @throws DxException  [参数说明]
      * @return ArrayList<OrderhistoryModel> [返回类型说明]
      * @exception throws [违例类型] [违例说明]
      * @see [类、类#方法、类#成员]
      */
    ArrayList<OrderhistoryModel> GetOrderStatusHistory(String OrderNumber,String token,long customerID)
        throws DxException;
    
    /**
      * 收到货后完成订单
      * @param OrderNumber
      * @param AutoEndEditOrder
      * @param OrderMemoAudienceType
      * @param Notes
      * @param Reason
      * @return  [参数说明]
      * @return String [返回类型说明]
      * @exception throws [违例类型] [违例说明]
      * @see [类、类#方法、类#成员]
      */
    String CompleteOrder(String OrderNumber, Operator Operator, String RequestUserName,String token,long customerID)
        throws DxException;
    
    /**
      * 获取支付状态
      * @param BeginTime
      * @param CurrentPage
      * @param EndTime
      * @param OrderNumber
      * @param PageSize
      * @param UserID
      * @return  [参数说明]
      * @return ArrayList<OrderQueryTranscationsModel> [返回类型说明]
      * @exception throws [违例类型] [违例说明]
      * @see [类、类#方法、类#成员]
      */
    OrderQueryTranscationsModel QueryTranscations(String BeginTime, int CurrentPage, String EndTime,
        String OrderNumber, int PageSize, String CustomerID)
        throws DxException;
    
    /**
     * 创建订单并返回paypal页面Url
     * @param orderPayPalModel
     * @return
     * @throws DxException
     */
   String createOrderAndSetMobile(OrderPaypalModel orderPayPalModel)
            throws DxException;
   
   /**
    * 获取用户订单不同状态数量
    * @param customerId
    * @return
    * @throws DxException
    */
   OrderStatusModel getOrderCount(long customerId,String token)throws DxException;
   
   /**
    * 重新支付未支付完成的订单
    * @param orderPayPalModel
    * @return
    * @throws DxException
    */
   String ReSetMobile(OrderPaypalModel orderPayPalModel)
	        throws DxException;
   /**
    * 部分支付
    * @param orderPayPalModel
    * @return
    * @throws DxException
    */
   String PartialSetMobile(OrderPaypalModel orderPayPalModel)
	        throws DxException;
   
   CreateOrderStatus createOrder(OrderPayModel orderPayModel)throws DxException;
   
   /**
 * 获取订单下物流信息
 * @param orderNumber 订单号
 * @param packages    包裹
 * @return 包裹信息
 * @throws DxException
 */
ArrayList<Package> GetShippingInfo(String orderNumber,ArrayList<Package> packages,String token,long customerID) throws DxException;
}
